package day06;
import java.util.Arrays;
public class Day06HomeWork02 {
    public static void main(String[] args) {

        int[] arr=new int[10];
        for (int i=0;i<arr.length;i++){
            arr[i]=(int)(Math.random()*1000);
        }
        int max=arr[0];
        Arrays.sort(arr);
        for (int i=1;i<arr.length;i++){
            if(max<arr[i]){
                max=arr[i];
            }
        }
        //===============================================
        System.out.println(max);
        arr=Arrays.copyOf(arr,arr.length+1);
        arr[arr.length-1]=max;

        say();
        sayHi(99);
        sayHello(99,"小李");
        getNum();
        int s=getNum();
        System.out.println(s);
        plus(1,89);
        testArray(10,1000);

    }
    public static void say(){
        System.out.println("11");
    }
    public static void sayHi(int score){
        System.out.println("分数为:"+score);
    }
    public static void sayHello(int score,String name){
        System.out.println("姓名："+name+"分数："+score);
    }
    public static int getNum(){
        int a=10;
        return a;
    }
    public static int plus(int a,int b){
        int c=a+b;
        System.out.println(c);
        return c;
    }
    public static int[] testArray(int a,int num){
        int[] arr=new int[a];
        for (int i=0;i<arr.length;i++){
            arr[i]=(int)(Math.random()*(num+1));
        }
        return arr;
    }
}
